package com.itheima.pinda.mapstruct;

import com.itheima.pinda.DTO.transportline.TransportLineDto;
import com.itheima.pinda.DTO.transportline.TransportLineTypeDto;
import com.itheima.pinda.DTO.transportline.TransportTripsDto;
import com.itheima.pinda.DTO.transportline.TransportTripsTruckDriverDto;
import com.itheima.pinda.entity.transportline.PdTransportLine;
import com.itheima.pinda.entity.transportline.PdTransportLineType;
import com.itheima.pinda.entity.transportline.PdTransportTrips;
import com.itheima.pinda.entity.transportline.PdTransportTripsTruckDriver;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;

/**
 * @author llhuang10
 * @date 2021/10/5 18:23
 */
@Mapper(builder = @Builder(disableBuilder = true), uses = {MyStringLongMapper.class})
public interface TransportDTO2Entity {


    /**
     * 运输线路表 Entity <---> DTO
     */
    PdTransportLine conver(TransportLineDto transportLineDto);

    TransportLineDto conver(PdTransportLine pdTransportLine);

    /**
     * 线路类型表  Entity <---> DTO
     */
    PdTransportLineType conver(TransportLineTypeDto transportLineTypeDto);

    TransportLineTypeDto conver(PdTransportLineType pdTransportLineType);

    /**
     * 车次表
     */
    PdTransportTrips conver(TransportTripsDto transportTripsDto);

    TransportTripsDto conver(PdTransportTrips pdTransportTrips);


    /**
     * 车次和司机关系表
     */
    PdTransportTripsTruckDriver conver(TransportTripsTruckDriverDto tripsTruckDriverDto);

    TransportTripsTruckDriverDto conver(PdTransportTripsTruckDriver pdTransportTripsTruckDriver);
}
